Ext.define('com.fansy.Viewer', {
      alias : 'widget.viewer',
      extend : 'Ext.form.Panel',
      opt : undefined,
      initComponent : function() {
        var defaultConfig = {
          border : false,
          frame : true,
          bodyStyle : {
            border : '0px',
            padding: '10px'
          }
        };

        Ext.applyIf(this, defaultConfig);

        this.items = [{
              xtype : 'panel',
              bodyStyle : {
	            	'border': '1px solid #ccc',
					'border-radius': '5px',
					'box-shadow': '0px 0px 5px #ccc'
	          },
              items : [
              {
                    xtype : 'button',
					cls  : this.opt.imageCls,
                    text : '',
					handler : function() {
						var path = this.opt.basePath;
						window.location.href = path + this.opt.action;
					},
					scope: this
              }],
              width : this.opt.width || 100,
              height : this.opt.height || 100
            }

];
        this.callParent(arguments);
      }
    });